import request from '@/utils/request'

// 查询通知公告列表
export function listAnnouncements(query) {
  return request({
    url: '/announcement/announcements/list',
    method: 'get',
    params: query
  })
}

// 查询通知公告详细
export function getAnnouncements(id) {
  return request({
    url: '/announcement/announcements/' + id,
    method: 'get'
  })
}

// 新增通知公告
export function addAnnouncements(data) {
  return request({
    url: '/announcement/announcements',
    method: 'post',
    data: data
  })
}

// 修改通知公告
export function updateAnnouncements(data) {
  return request({
    url: '/announcement/announcements',
    method: 'put',
    data: data
  })
}

// 删除通知公告
export function delAnnouncements(id) {
  return request({
    url: '/announcement/announcements/' + id,
    method: 'delete'
  })
}

// 导出通知公告
export function exportAnnouncements(query) {
  return request({
    url: '/announcement/announcements/export',
    method: 'get',
    params: query
  })
}